package com.yanqu.road.entity.activity.mall;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;

@FieldTypeAnnotation(tableName = "t_u_activity_mall_touch_data")
public class UserActivityMallTouchData extends DataObject {

    @FieldTypeAnnotation(desc = "活动ID", select = true, update = true)
    private int activityId;

    @FieldTypeAnnotation(desc = "礼包ID", update = true)
    private int mallId;

    @FieldTypeAnnotation(desc = "可购买次数")
    private int num;

    @FieldTypeAnnotation(desc = "生效时间")
    private long effectTime;

    public UserActivityMallTouchData() {
    }

    public UserActivityMallTouchData(int activityId, int mallId, int num, long effectTime) {
        this.activityId = activityId;
        this.mallId = mallId;
        this.num = num;
        this.effectTime = effectTime;
    }

    public int getActivityId() {
        return activityId;
    }
    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public int getMallId() {
        return mallId;
    }

    public void setMallId(int mallId) {
        if(this.mallId != mallId) {
            this.mallId = mallId;
            setUpdateOption();
        }
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        if(this.num != num) {
            this.num = num;
            setUpdateOption();
        }
    }

    public long getEffectTime() {
        return effectTime;
    }

    public void setEffectTime(long effectTime) {
        if(this.effectTime != effectTime) {
            this.effectTime = effectTime;
            setUpdateOption();
        }
    }
}
